//
//  WCNTypePatientVC.m
//  WCN
//
//  Created by wsj2015 on 15/9/22.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNTypePatientVC.h"
#import "WCNPastPaientsVC.h"
#import "WCNPatientVC.h"

@interface WCNTypePatientVC ()<UITableViewDelegate,UITableViewDataSource>

{
    NSArray *_titleArray;
}


@property (weak, nonatomic) IBOutlet UITableView *tableView;


@end

@implementation WCNTypePatientVC



- (void)viewDidLoad {
    [super viewDidLoad];
  
     self.title =@"患者";
    
    _titleArray =@[@"住院患者",@"过往患者"];
    self.tableView.alwaysBounceVertical =NO;
    
    
}


// 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
 
    return 2;

}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 60;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellID =@"cellId";
    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellID];
    if (nil == cell) {
        cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    cell.textLabel.text =_titleArray[indexPath.row];
    cell.textLabel.font =[UIFont systemFontOfSize:22];
    cell.selectionStyle =UITableViewCellSelectionStyleDefault;
    cell.accessoryType =UITableViewCellAccessoryDisclosureIndicator;
    return cell;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row == 0) {
        WCNPatientVC *vc =[[WCNPatientVC alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
        
    }else{
        WCNPastPaientsVC *vc =[[WCNPastPaientsVC alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
    }

}
@end
